import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import path from "path";

export default defineConfig({
    dev: {
        liveReload: false,
        writeToDisk: true,
        hmr: false,
    },
    plugins: [pluginReact()],
    source: {
        entry: {
            index: path.join(__dirname, "src/main.tsx"),
        },
        alias: {
            "@": "./src",
        },
    },
    output: {
        cssModules: {
            auto: true,
            localIdentName: "[local]_[hash:base64:5]",
        },
    },
    performance: {
        chunkSplit: {
            strategy: "split-by-experience",
        },
    },
    html: {
        template: "./index.html",
        title: "AI Chat Assistant",
    },
    tools: {
        postcss: {},
    },
});
